package com.example.helloandroidworld;

import android.app.TimePickerDialog.OnTimeSetListener;
import android.app.TimePickerDialog;
import android.app.Dialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;


public class TimePickerFragment extends DialogFragment
{
	private OnTimeSetListener timeSet;
	
	public TimePickerFragment(){}
	
	public void setCallBack( OnTimeSetListener onTime )
	{
		timeSet = onTime;
	}

	private int hour, minute;
	
	public void setArguments(Bundle args)
	{
		hour = args.getInt("hour");
		minute = args.getInt("minute");
	}

	
	public Dialog onCreateDialog( Bundle savedInstanceState)
	{
		return new TimePickerDialog(getActivity(), timeSet, hour, minute, false);
	}
}